package cn.com.homeyoda.aimate.aihealth.ui.game.play;

import android.app.Application;

import androidx.annotation.NonNull;

import cn.com.homeyoda.aimate.aihealth.base.BaseViewModel;
import cn.com.homeyoda.aimate.aihealth.data.Repository;

import com.wzq.mvvmsmart.event.StateLiveData;

import java.util.ArrayList;
import java.util.List;

public class GamePlayViewModel extends BaseViewModel<Repository> {

    public StateLiveData<List<GamePlayBean>> gamePlayData;

    public GamePlayViewModel(@NonNull Application application, Repository model) {
        super(application, model);
        gamePlayData = new StateLiveData<>();
        gamePlayData.setValue(new ArrayList<>());
    }

    public void getGamePlayData() {
        List<GamePlayBean> list = new ArrayList<>();
        list.add(new GamePlayBean("一加一在什么情况下等于三？", "A：在算错的情况下等于三", "B：不知道不清楚什么情况", "C：在算对的情况下等于三", "D：用真心的情况下等于三", true));
        list.add(new GamePlayBean("树上骑个猴，地上一个猴，请问一共几个猴子？", "A：三个猴子", "B：九个猴子", "C：两个猴子", "D：八个猴子", true));
        list.add(new GamePlayBean("一加一在什么情况下等于三？", "A：不知道不清楚什么情况", "B：不知道不清楚什么情况", "C：用真心的情况下等于三", "C：在算对的情况下等于三", false));
        list.add(new GamePlayBean("树上骑个猴，地上一个猴，请问一共几个猴子？", "A：三个猴子", "B：九个猴子", "C：两个猴子", "D：八个猴子", true));
        list.add(new GamePlayBean("一加一在什么情况下等于三？", "A：在算错的情况下等于三", "B：在算对的情况下等于三", "C：不知道不清楚什么情况", "D：不知道不清楚什么情况", false));
        list.add(new GamePlayBean("树上骑个猴，地上一个猴，请问一共几个猴子？", "A：三个猴子", "B：九个猴子", "C：两个猴子", "D：八个猴子", false));
        list.add(new GamePlayBean("一加一在什么情况下等于三？", "A：不知道不清楚什么情况", "B：用真心的情况下等于三", "C：在算错的情况下等于三", "D：不知道不清楚什么情况", true));
        list.add(new GamePlayBean("树上骑个猴，地上一个猴，请问一共几个猴子？", "A：三个猴子", "B：九个猴子", "C：两个猴子", "D：八个猴子", true));
        list.add(new GamePlayBean("一加一在什么情况下等于三？", "A：不知道不清楚什么情况", "B：用真心的情况下等于三", "C：在算错的情况下等于三", "D：不知道不清楚什么情况", true));
        list.add(new GamePlayBean("树上骑个猴，地上一个猴，请问一共几个猴子？", "A：三个猴子", "B：九个猴子", "C：两个猴子", "D：八个猴子", false));
        gamePlayData.postSuccess();
        gamePlayData.getValue().addAll(list);
        gamePlayData.postValueAndSuccess(gamePlayData.getValue());
    }
}
